//
// NLSESolverAppController.h
// NLSE Solver, Created by jmpp on 9/2/10.
// $Id: NLSESolverAppController.h 16 2010-11-03 14:19:32Z jmpalacios $

/**
* =================================================================
* Copyright (C) 2010, Juan Manuel Palacios. All Rights Reserved.
*
* This software project, which includes this module, is licensed
* as described in the file LICENSE, which you should have received
* as part of this distribution, and may be used only according to
* the terms described therein.
*
* =================================================================
**/


#import <Cocoa/Cocoa.h>
#import "NLSESolverWindowController.h"


enum _NLSEQuitReasons
{
    kOpenGLPixelFormatUnavailable = 0,
    kOpenGLContextUnavailable = 1,
    kApplicationWindowUnavailable = 2
};
typedef NSUInteger NLSEQuitReasons;


@protocol NLSESolverAppController

@property (assign, readonly) NSOpenGLPixelFormat *sharedPixelFormat;
@property (assign, readonly) NSOpenGLContext *sharedOpenGLContext;

- (void) applicationShouldQuit:(NLSEQuitReasons)theReason;

@end


@interface NLSESolverAppController : NSObject <NSApplicationDelegate, NLSESolverAppController>
{
    NSOpenGLPixelFormat *sharedPixelFormat;
    NSOpenGLContext *sharedOpenGLContext;
  @private
    IBOutlet NLSESolverWindowController *windowController;
}

+ (NLSESolverAppController *)sharedInstance;
- (id) init;
- (void) applicationDidFinishLaunching:(NSNotification *)theNotification;

@end
